#pragma once

class DImage;
class DAnimation;

typedef std::map<std::string, boost::shared_ptr<DAnimation> > AnimMap;
typedef std::list<boost::shared_ptr<DImage> > ImageList;

class DIResourceManager
{
public:
    DIResourceManager(void);
    ~DIResourceManager(void);

    // Don't set here any of animation parametar. Set it after animation() call on deep copies object, instead.
    // animation name is path that begins in Graphics folder without .anm extension
    virtual bool loadAnimation(const std::string& strAnimName, bool bIsBackground = false);
    boost::shared_ptr<DAnimation> animation(const std::string& strAnimName);
protected:
    virtual boost::shared_ptr<DImage> loadImage(const std::string& strImagePath, bool bIsBackground = false) = 0;

    ImageList m_images;
    AnimMap m_anims;
};
